from tkinter import *
root = Tk()

def callback(event):
    print("点击坐标",event.x,event.y)

frame = Frame(root,width = 300,height = 300) #创建一个Frame
frame.bind("<Button-1>",callback)  #将鼠标左键事件与Frame绑定
frame.pack()

mainloop()
